<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
    <title>医院陪护服务管理系统</title>
</head>
<style>
    .layui-table td, .layui-table th{
        font-size: 15px!important;
    }
    .layui-table-cell {
        height: 50px!important;
        line-height: 50px!important;
    }
</style>
<body class="layui-layout-body layui-layout-theme-default" >
<div class="layui-layout layui-layout-admin layui-layout-left-hide">

    <!--  侧边栏  -->
    <div class="layui-side">
        <a class="layui-side-target" data-target-menu-type></a>
        <a class="layui-logo layui-elip" >
            <span class="headtxt">医院陪护服务管理系统</span>
        </a>
        <div class="layui-side-scroll">
            <div class="layui-side-icon">

                <div th:each="item:${treeMenu}">
                    <a th:data-menu-node="'m-' +${item.value.id}" th:attr="data-open=${item.value.url}">
                        <i th:class="${item.value.icon}"></i>
                        <span th:text="${item.value.title}">一级菜单</span>
                    </a>
                </div>

            </div>

            <div class="layui-side-tree">

                <th:block th:each="item:${treeMenu}">

                    <th:block class="layui-nav-child" th:if="${item.value.children.size()}">


                        <ul  class="layui-nav layui-nav-tree layui-hide" th:data-menu-layout="'m-' +${item.value.id}">

                            <th:block th:each="sItem:${item.value.children}">

                                <th:block th:if="${sItem.value.children.size()}">

                                    <li class="layui-nav-item" th:data-submenu-layout="'m-' + ${item.value.id}+'-'+${sItem.value.id}">

                                        <a th:data-target-tips="${sItem.value.title}" >
                                            <span th:class="'nav-icon ' + (${sItem.value.icon})"></span>
                                            <span class="nav-text" th:text="${sItem.value.title}"></span>
                                        </a>

                                        <dl class="layui-nav-child">

                                            <dd th:each="tItem:${sItem.value.children}">
                                                <a th:data-target-tips="${tItem.value.title}" th:data-open="${tItem.value.url}" th:data-menu-node="'m-' +${item.value.id}+'-'+${sItem.value.id}+'-'+${tItem.value.id}">
                                                    <span th:class="'nav-icon ' + (${tItem.value.icon})"></span>
                                                    <span class="nav-text" th:text="${tItem.value.title}"></span>
                                                </a>
                                            </dd>

                                        </dl>
                                    </li>

                                </th:block>

                                <th:block th:unless="${sItem.value.children.size()}">
                                    <li class="layui-nav-item" >
                                        <a th:data-target-tips="${sItem.value.title}" th:data-open="${sItem.value.url}" th:data-menu-node="'m-' +${item.value.id}+'-'+${sItem.value.id}" >
                                            <span th:class="'nav-icon ' + (${sItem.value.icon})"></span>
                                            <span class="nav-text" th:text="${sItem.value.title}"></span>
                                        </a>
                                    </li>
                                </th:block>

                            </th:block>

                        </ul>
                    </th:block>
                </th:block>
            </div>

        </div>
    </div>

    <!--  顶栏  -->
    <div class="layui-header nav-header">
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item" lay-unselect>
                <a class="text-center" data-target-menu-type>
                    <i class="layui-icon layui-icon-spread-left"></i>
                </a>
            </li>
            <li class="layui-nav-item" lay-unselect>
                <a class="layui-logo-hide layui-elip" href="/" title="{:sysconf('app_name')}">
                    <span class="headimg headimg-no headimg-xs">LOGO</span>
                </a>
            </li>

            <li class="layui-nav-item" th:each="item:${treeMenu}">
                <a th:data-menu-node="'m-' +${item.value.id}" th:data-open="${item.value.url}"><span th:text="${item.value.title}"></span></a>
            </li>

        </ul>
        <ul class="layui-nav layui-layout-right">
            <li lay-unselect class="layui-nav-item"><a data-reload><i class="layui-icon layui-icon-refresh-3"></i></a></li>
            <li lay-unselect class="layui-nav-item"><a href="/" target="_blank"><i
                    class="layui-icon layui-icon-home"></i></a>
            </li>

            <li class="layui-nav-item">
                <dl class="layui-nav-child">
                    <dd lay-unselect><a data-modal="/info"><i
                            class="layui-icon layui-icon-set-fill"></i> 基本资料</a></dd>
                    <dd lay-unselect><a data-load="/logout" data-confirm="确定要退出登录吗？"><i
                            class="layui-icon layui-icon-release"></i> 退出登录</a></dd>
                </dl>
                <a class="layui-elip">
                    <span class="headimg"></span>
                    <span th:text="${user.nickname}"></span>
                </a>
            </li>


        </ul>
    </div>


    <!-- 主体内容 开始 -->
    <div class="layui-body">
        <div class="think-page-body" >
            主体区域
        </div>
        <!-- 页面加载动画 -->
        <div class="think-page-loader layui-hide">
            <div class="loader"></div>
        </div>
    </div>
    <!-- 主体内容 结束 -->

</div>


<!-- 加载动画 开始 -->
<div class="think-page-loader">
    <div class="loader"></div>
</div>
<!-- 加载动画 结束 -->

<script th:replace="/common/template :: script"></script>

</body>
</html>
